using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace JufGame
{
	public class ShowLOD : MonoBehaviour
	{
		private LOD_Character character;
		private MeshRenderer mesh;
		[SerializeField] private Image[] features;
		[SerializeField] private Color[] lods;
		private void Awake()
		{
			character = GetComponentInParent<LOD_Character>();
			mesh = GetComponentInParent<MeshRenderer>();
		}
		private void LateUpdate()
		{
			transform.rotation = Quaternion.LookRotation(Camera.main.transform.forward);
			for(int i = 0; i < features.Length; ++i)
			{
				var lodEnum= character.Feature_Solution.GetLODForFeatureEnum((FeatureEnum)i);
				features[i].color = lods[(int)lodEnum];
			}
		}
	}
}
